package es.cea.web;

public class Calculadora {

	private double valor1;
	private double valor2;
	
	public Calculadora(double valor1, double valor2){
		this.valor1 = valor1;
		this.valor2 = valor2;
	}
	
	public double opera(String operador){
		
		if (operador.equals("suma")){
			return valor1+ valor2;
		} else if (operador.equals("resta")){
			return valor1- valor2;
		} else if (operador.equals("multiplicacion")){
			return valor1 * valor2;
		} else if (operador.equals("division")){
			return valor1 / valor2;
		}
				
		return Double.MIN_VALUE;
		
	}
}
